package com.ruoyi.web.controller.app;

import java.util.List;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;

import com.ruoyi.app.domain.bo.AppImCustomerServiceBo;
import com.ruoyi.app.domain.vo.AppImCustomerServiceVo;
import com.ruoyi.app.service.IAppImCustomerServiceService;
import lombok.RequiredArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.*;
import cn.dev33.satoken.annotation.SaCheckPermission;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import com.ruoyi.common.annotation.RepeatSubmit;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.core.validate.QueryGroup;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 客服
 *
 * @author ruoyi
 * @date 2025-11-11
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/imCustomerService")
public class AppImCustomerServiceController extends BaseController {

    private final IAppImCustomerServiceService iAppImCustomerServiceService;

    /**
     * 查询客服列表
     */
    @GetMapping("/list")
    public TableDataInfo<AppImCustomerServiceVo> list(AppImCustomerServiceBo bo, PageQuery pageQuery) {
        return iAppImCustomerServiceService.queryPageList(bo, pageQuery);
    }


    /**
     * 获取客服详细信息
     *
     * @param id 主键
     */
    @SaCheckPermission("system:imCustomerService:query")
    @GetMapping("/{id}")
    public R<AppImCustomerServiceVo> getInfo(@NotNull(message = "主键不能为空")
                                     @PathVariable String id) {
        return R.ok(iAppImCustomerServiceService.queryById(id));
    }



}
